package com.cqhilink.iot.jobstandardmanagement.facade.service;

import com.cqhilink.iot.jobstandardmanagement.facade.model.Organization;
import com.cqhilink.iot.jobstandardmanagement.facade.model.Ztree;

import java.util.List;

/**
 * Created by YuPeng on 2016/11/30.
 * 部门查询公用接口
 */
public interface OutDepartmentService {
    /**
     * 查询出所有的部门树
     * @return
     */
    public List<Ztree> queryDeptTree(String isOrg,String Id,String keyword) throws Exception;

    /**
     *  查询当前组织下所有部门
     */
    public List<Ztree> queryDeptTree(String orgId) throws Exception;

    /**
     * 如果父级为机构Organization，即isOrg=1时，按父级机构ID查询下级部门
     * @return
     */
    public List<Ztree> queryDeptTreeByPOId(String orgId) throws Exception;

    /**
     * 如果父级为部门Department，即isOrg=0时，按父级部门ID查询下级部门
     * @return
     */
    public List<Ztree> queryDeptTreeByPDId(String deptId) throws Exception;
    /**
     * 获取部门或机构的上级管理机构
     * @param id  机构或部门的ID
     * @return
     * @throws Exception
     */
    public Organization getParentOrg(String id)throws Exception;

}
